// import { ViteSSG } from 'vite-ssg'
// import { setupLayouts } from 'virtual:generated-layouts'

/* import the fontawesome core */
import { library } from '@fortawesome/fontawesome-svg-core'

/* import font awesome icon component */
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

/* import specific icons */
import { fas } from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'

import { createRouter, createWebHistory } from 'vue-router'

// import Previewer from 'virtual:vue-component-preview'
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import App from './App.vue'
import generatedRoutes from '~pages'
import 'element-plus/dist/index.css'

// vue (gyq

// vant
import 'vant/lib/index.css'

// import '@unocss/reset/tailwind.css'
import './styles/main.scss'
import 'uno.css'

// const routes = setupLayouts(generatedRoutes)
const routes = generatedRoutes

/* add icons to the library */
library.add(fas, far, fab)

// https://github.com/antfu/vite-ssg
export const app = createApp(
  App,
)
const router = createRouter({
  history: createWebHistory(),
  routes,
})

app.use(router)
app.component('FontAwesomeIcon', FontAwesomeIcon)
app.use(ElementPlus)
app.mount('#app')
